<?php
/**
 * Created by PhpStorm.
 * User: minicart
 * Date: 2018/10/15
 * Time: 15:29
 */

namespace app\admin\controller;
use app\admin\service\EducationalService;

/**
 * Class Educational
 * @package app\admin\controller
 */
class Educational extends Common
{
    /**
     * 老师课表teacher_timetable
     */
    public function teacher_timetable()
    {
        return view();
    }

    /**
     * 教室课表classroom_timetable
     */
    public function classroom_timetable()
    {
        return view();
    }

    /**
     * 班课管理class_management
     * @return \think\response\View
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function class_management()
    {
        if (request()->isPost()) {
            return json((new EducationalService())->class_management());
        }
        $this->dictionary();
        return view();
    }

    /**
     * 新建班课
     * @return \think\response\Json|\think\response\View
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function add_class()
    {
        if (request()->isPost()) {
            return json((new EducationalService())->classLogic($type = 1));
        }
        $this->dictionary();
        return view();
    }

    /**
     * 班课学员class_students
     */
    public function class_students()
    {
        return view();
    }

    /**
     * 分班合班split_shift
     */
    public function split_shift()
    {
        return view();
    }

    /**
     * 排课列表arranging_list
     */
    public function arranging_list()
    {
        return view();
    }

    /**
     * 班课考勤class_attendance
     */
    public function class_attendance()
    {
        return view();
    }

    /**
     * 档期管理schedule_management
     */
    public function schedule_management()
    {
        return view();
    }

    /**
     * 补课管理remedial_management
     */
    public function remedial_management()
    {
        return view();
    }

}